package 接口回调;

public class Employee {
    private CallBackInterface callBackInterface;

    public void setCallBackInterface(CallBackInterface callBackInterface) {
        this.callBackInterface = callBackInterface;
    }

    public void work() {
        System.out.println("员工开始工作");
        if (callBackInterface != null) {
            callBackInterface.callBack();
        }
    }
}
